<ion-header>
    <ion-toolbar>
        <ion-buttons slot="start">
            <ion-back-button [text]="'core.back' | translate" />
        </ion-buttons>
        <ion-title>
            <h1>
                <core-format-text [text]="title" contextLevel="module" [contextInstanceId]="cmId" [courseId]="courseId" />
            </h1>
        </ion-title>
        <ion-buttons slot="end">
            <core-button-with-spinner *ngIf="showToc" [loading]="loadingToc">
                <ion-button fill="clear" *ngIf="toc.length" (click)="openToc()" [ariaLabel]="'addon.mod_scorm.toc' | translate"
                    aria-haspopup="true">
                    <ion-icon name="fas-bookmark" slot="icon-only" aria-hidden="true" />
                </ion-button>
            </core-button-with-spinner>
        </ion-buttons>
    </ion-toolbar>
</ion-header>
<ion-content>
    <core-loading [hideUntil]="loaded">
        <core-iframe *ngIf="loaded" id="scorm_object" [src]="src" [iframeWidth]="scormWidth" [iframeHeight]="scormHeight"
            [showFullscreenOnToolbar]="true" [autoFullscreenOnRotate]="true" />

        <p *ngIf="!src && errorMessage">{{ errorMessage | translate }}</p>
    </core-loading>

    <core-navigation-bar collapsible-footer appearOnBottom *ngIf="loaded && navigationItems.length > 1" [items]="navigationItems"
        (action)="loadSco($event)" slot="fixed" />
</ion-content>
